package operatebag;

import javax.swing.*;
import mysqloperate.*;

import java.awt.*;

public class showstudent extends JFrame {
    JFrame jf;
    private JTable table;
    private JScrollPane jp;

    public showstudent() throws Exception {
        setTitle("学生数据");
        setLayout(null);
        setBounds(300,100,800,700);
        setResizable(false);
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        setVisible(true);
        jf=this;
        Object str[]={"学号","姓名","性别","出生日期","数学成绩","Java成绩","体育成绩"};
        searchstu search=new searchstu();
        Object[][] info=search.search();

        table=new JTable(info,str);
        table.setEnabled(false);

        jp=new JScrollPane(table);
        jp.setBounds(10,10,800,600);
        add(jp);
    }

}
